package br.gov.cemaden.library.model.previsao;

import br.gov.cemaden.library.model.BaseEntity;
import br.gov.cemaden.library.model.Agencia;
import java.util.Date;
import java.util.List;

/**
 *
 * @author alan.oliveira
 * 
 * @Entity
 * @Table(name = "previsao_precipitacao_aquisicao", schema = "previsao")
 * @SequenceGenerator(name = "sequence", sequenceName = "previsao.previsao_precipitacao_aquisicao_sequence", schema = "previsao")
 */
public abstract class AquisicaoPrecipitacao implements BaseEntity{
    
    /**
     * @Id
     * @GeneratedValue(generator = "sequence", strategy = GenerationType.AUTO)
     * @Column(name = "id_previsao_precipitacao_aquisicao")
     */
    protected Long id;
    
    /**
     * @Temporal(javax.persistence.TemporalType.TIMESTAMP)
     * @Column(name = "aquisicao")
     */
    protected Date aquisicao;
    
    /**
     * @ManyToOne(optional = false)
     * @JoinColumn(name = "id_agencia", referencedColumnName = "id_agencia")
     */
    protected Agencia agencia;
    
    /**
     * @OneToMany(mappedBy = "aquisicao", cascade = CascadeType.ALL)
     */
    protected List<PrevisaoPrecipitacao> previsoes;    

    public abstract Long getId();

    public void setId(Long id) {
        this.id = id;
    }

    public abstract Date getAquisicao();

    public void setAquisicao(Date aquisicao) {
        this.aquisicao = aquisicao;
    }

    public abstract Agencia getAgencia();

    public void setAgencia(Agencia agencia) {
        this.agencia = agencia;
    }

    public abstract List<PrevisaoPrecipitacao> getPrevisoes();

    public void setPrevisoes(List<PrevisaoPrecipitacao> previsoes) {
        this.previsoes = previsoes;
    }    
    
}
